package com.naizhuai.ui.task.multtype;

import android.text.TextUtils;

import com.google.gson.annotations.SerializedName;

import java.util.List;

/**
 * @author：lichenxi
 * @date 2018/5/9 17
 * email：525603977@qq.com
 * Fighting
 */
public class TaskInfo {
    @SerializedName("keyResult")
    public String keyresult;
    @SerializedName("taskType")
   public String taskType;
    @SerializedName("endDay")
   public String finishTime;
    @SerializedName("detail")
   public List<String> taskinfos;
    @SerializedName("completeTaskCount")
   public String completeTaskCount;
    @SerializedName("unCompleteTaskCount")
    public String unCompleteTaskCount;

    public TaskInfo(String keyresult, String tasktype, String finishTime, List<String> taskinfos) {
        this.keyresult = keyresult;
        this.taskType = tasktype;
        this.finishTime = finishTime;
        this.taskinfos = taskinfos;
        this.completeTaskCount="2";
        this.unCompleteTaskCount="10";
    }
   public String getTaskExplain(){
        StringBuffer link=new StringBuffer();
       for (int i=0;i<taskinfos.size();i++){
           link.append(i+1+"."+taskinfos.get(i)+"\n");
        }
        if (!TextUtils.isEmpty(link))
             link.deleteCharAt(link.length()-1);
        return link.toString();
   }
}